<%@ page language="java" contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
	<title>测试展示列表页面</title>
	<%@ include file="../../common/jsp/header.jsp"%>
    <script language="JavaScript">
        $(function () {
            $("#updateButton").click(function () {
              var url=root+$("#updateButton").attr("name");
              $("#searchForm").attr("action",url).submit();
            })

			$("#delete").click(function () {

				var url=root+$("#delete").attr("name");
				$("#searchForm").attr("action",url).submit();
			})

			$("#stop").click(function () {

				var url=root+$("#stop").attr("name");
				$("#searchForm").attr("action",url).submit();
			})

			$("#start").click(function () {

				var url=root+$("#start").attr("name");
				$("#searchForm").attr("action",url).submit();
			})
			$("#all").click(function () {

				var url=root+$("#all").attr("name");
				$("#searchForm").attr("action",url).submit();
			})
        })



    </script>
</head>
<body>
<div class="wrapper wrapper-content animated fadeInRight">
	<div class="ibox float-e-margins">
		<form id="searchForm" action="${path}/masterials/queryMasterials.do">
			<div class="col-sm-12">
				<!-- ------------按钮组 start------------ -->
				<div class="alert alert-success" role="alert">物资列表</div>
				<div class="col-sm-8">
					<div class="btn-group hidden-xs" role="group">
						<button type="button" class="btn btn-primary" data-toggle="modal" id="create" name="masterials/create.jsp">
							<i class="glyphicon glyphicon-plus" aria-hidden="true"></i>新增物资
						</button>
						<button type="button" class="btn btn-success" data-toggle="modal" id="update" name="test/view.do">
							<i class="glyphicon glyphicon-pencil" aria-hidden="true"></i>批量新增导入
						</button>
						<button type="button" class="btn btn-danger" data-toggle="modal" id="" name="test/delete.do">
							<i class="glyphicon glyphicon-trash" aria-hidden="true"></i>查询
						</button>
						<button type="button" class="btn btn-danger" data-toggle="modal" id="delete" name="masterials/delete.do">
							<i class="glyphicon glyphicon-trash" aria-hidden="true"></i>删除
						</button>
						<button type="button" class="btn btn-danger" data-toggle="modal" id="updateButton" name="masterials/queryById.do" >
							<i class="glyphicon glyphicon-trash" aria-hidden="true"></i>编辑
						</button>
						<button type="button" class="btn btn-danger" data-toggle="modal" id="stop" name="test/stop.do">
							<i class="glyphicon glyphicon-trash" aria-hidden="true"></i>停用
						</button>
						<button type="button" class="btn btn-danger" data-toggle="modal" id="start" name="test/start.do">
							<i class="glyphicon glyphicon-trash" aria-hidden="true"></i>启用
						</button>
						<button type="button" class="btn btn-danger" data-toggle="modal" id="all" name="test/all.do">
							<i class="glyphicon glyphicon-trash" aria-hidden="true"></i>显示全部
						</button>
					</div>
				</div>
				<div class="col-sm-4">
					<input class="form-control" id="search" name="testName" value="${testEntity.testName }" type="text" placeholder="查询内容 回车搜索"/>
				</div>
				<!-- ------------按钮组 end------------ -->
				<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
				<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
				<table class="table table-striped table-bordered table-hover table-condensed">
					<thead>
					<tr>
						<th><input type="checkbox" id="checkall"/></th>
						<th>物资编码</th>
						<th>物资名称</th>
						<th>物资简称</th>
						<th>规格</th>
						<th>物资分类</th>
						<th>基本单位</th>
						<th>状态</th>
						<th>修改时间</th>
						<th>创建人</th>
					</tr>
					</thead>
					<tbody>
					<c:set var="vs"></c:set>
					<c:forEach var="e" items="${Page.list }" varStatus="v">
						<tr>
						<td><input type="checkbox" name="gamId" id="ids" value="${e.gamId }"/></td>
							<td>${e.gamId}</td>
							<td>${e.gamName}</td>
							<td>${e.gamAbbname}</td>
							<td>${e.gamSize}</td>
							<td>${e.gamType}</td>
							<td><zhg:show codeTp="WeightUtils" value="${e.gamBaseunit}"/></td>
                            <td id="status">${e.gamStatus==1?"启用":"未启用"}</td>
							<td>${e.updateDate}</td>
							<td>张三</td>
						</tr>
					</c:forEach>
					</tbody>
				</table>
				<div class="page">${Page}</div>
			</div>
		</form>
	</div>
</div>
</body>
</html>